<template>
  <div class="shopinfo">
    <img :src="item.imgUrl" alt="" class="shopinfo__img" />
    <div
      :class="{
        shopinfo__content: true,
        'shopinfo__content--border': hide ? false : true,
      }"
    >
      <p class="shopinfo__content__tittle">{{ item.name }}</p>
      <div class="shopinfo__content__tags">
        <span class="shopinfo__content__tag">月售：{{ item.sales }}</span>
        <span class="shopinfo__content__tag"
          >起送：{{ item.expressLimit }}</span
        >
        <span class="shopinfo__content__tag"
          >基础运费：{{ item.expressPrice }}</span
        >
      </div>
      <p class="shopinfo__content__highlight">{{ item.slogan }}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "ShopInfo",
  // 接收父组件传递过来的商店信息，和是否隐藏下边框信息
  props: ["item", "hide"],
};
</script>

<style lang="scss" scoped>
@import "../style/viriables";
.shopinfo {
  padding-top: 0.12rem;
  display: flex;
  &__img {
    width: 0.56rem;
    height: 0.56rem;
    margin-right: 0.16rem;
  }
  .shopinfo__content {
    flex: 1;
    padding-bottom: 0.12rem;
    &--border {
      border-bottom: 1px solid $content-bgcolor;
    }
    &__tittle {
      font-size: 0.16rem;
      color: $content-fontcolor;
      line-height: 0.22rem;
      margin-bottom: 0.08rem;
    }
    &__tags {
      font-size: 0.13rem;
      color: $content-fontcolor;
      margin-bottom: 0.08rem;
      .shopinfo__content__tag {
        margin-right: 0.16rem;
      }
    }
    &__highlight {
      font-size: 0.13rem;
      color: $content-highlightcolor;
      margin-top: 0;
      margin-bottom: 0.04rem;
    }
  }
}
</style>